package com.avamanager.app.service.impl;

import java.util.List;
import com.avamanager.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.avamanager.app.mapper.AppScoreMapper;
import com.avamanager.app.domain.AppScore;
import com.avamanager.app.service.IAppScoreService;

/**
 * 成绩信息Service业务层处理
 * 
 * @author FenvyYe
 * @date 2022-08-15
 */
@Service
public class AppScoreServiceImpl implements IAppScoreService 
{
    @Autowired
    private AppScoreMapper appScoreMapper;

    /**
     * 查询成绩信息
     * 
     * @param scoreId 成绩信息主键
     * @return 成绩信息
     */
    @Override
    public AppScore selectAppScoreByScoreId(Long scoreId)
    {
        return appScoreMapper.selectAppScoreByScoreId(scoreId);
    }

    /**
     * 查询成绩信息列表
     * 
     * @param appScore 成绩信息
     * @return 成绩信息
     */
    @Override
    public List<AppScore> selectAppScoreList(AppScore appScore)
    {
        return appScoreMapper.selectAppScoreList(appScore);
    }

    /**
     * 新增成绩信息
     * 
     * @param appScore 成绩信息
     * @return 结果
     */
    @Override
    public int insertAppScore(AppScore appScore)
    {
        appScore.setCreateTime(DateUtils.getNowDate());
        return appScoreMapper.insertAppScore(appScore);
    }

    /**
     * 修改成绩信息
     * 
     * @param appScore 成绩信息
     * @return 结果
     */
    @Override
    public int updateAppScore(AppScore appScore)
    {
        appScore.setUpdateTime(DateUtils.getNowDate());
        return appScoreMapper.updateAppScore(appScore);
    }

    /**
     * 批量删除成绩信息
     * 
     * @param scoreIds 需要删除的成绩信息主键
     * @return 结果
     */
    @Override
    public int deleteAppScoreByScoreIds(Long[] scoreIds)
    {
        return appScoreMapper.deleteAppScoreByScoreIds(scoreIds);
    }

    /**
     * 删除成绩信息信息
     * 
     * @param scoreId 成绩信息主键
     * @return 结果
     */
    @Override
    public int deleteAppScoreByScoreId(Long scoreId)
    {
        return appScoreMapper.deleteAppScoreByScoreId(scoreId);
    }
}
